//获得所有书籍类别（标签）

export const getBookTags = async (proxy) => {
  try {
    const response = await proxy.$http.get('/api/book/tag');
    if (response.data.success) {
      // 去除重复的类别
      const tags = [...new Set(response.data.data.tag)];
      return tags;
    }
    else {
      console.error('Failed to fetch book tags:', response.data.message);
      return null;
    }
  } catch (error) {
    console.error('Error fetching book tags:', error);
    return null;
  }
};
